const path = require('path');
// console.log(path.join('a', 'b', 'c'));

console.log(path.resolve('/a', '/b', '/c'));
console.log(path.extname('/a/b/c/d/xx/a.jpg'));